import { _decorator, Size, View } from 'cc';
const { ccclass } = _decorator;


enum GAMESTATE {
   /**
    * @zh 游戏准备中
    */
   READY = 1,
   /**
    * @zh 游戏中
    */
   PLAYING = 2,
   /**
    * @zh 游戏暂停
    */
   PAUSE = 3,
   /**
    * @zh 游戏结束
    */
   OVER = 4,

}


@ccclass('Config')
export class Config {

   static loading:boolean = false;
   /**
    * 视图的设计分辨率
    */
   static designResolutionSize: Size = View.instance.getDesignResolutionSize()
   /**
    * 全屏视图下屏幕的尺寸
    */
   static visibleSize: Size = View.instance.getVisibleSize()

   /**
    * 高度缩放比例:屏幕背景高度适配
    */
   static heightScaling: number = Math.round(Config.visibleSize.height / Config.designResolutionSize.height * 100) / 100

   //显示插屏广告
   static intersitialAdUnitId: string;
   //激励视频广告
   static rewardedVideoAdUnitId: string;
   //横幅广告
   static bannerAdAdUnitId: string;
   //原生模板广告
   static customAdUnitId: string;


   static openid: string = ''
   static unionid: string = ''
   static appid: string = ''
   static level: number = 1
   static integral: number = 0
   static uName: string = ''
   static uImg: string = ''



   //每套卡片数量
   static MAX_CARD: number = 18;
   //单张卡片宽高信息
   static CARD_WIDTH: number = 90;
   static CARD_HIGHT: number = 94;

   static GAME_STATE = GAMESTATE; // 游戏状态枚举

   //本地最多关卡数量--如果增加了关卡需要修改，超过本地关口会从服务器获取关卡
   static MAX_LEVEL: number = 2;


   static GAME_SUM_CARD1: number = 4; //当前关卡出现卡牌数量
   static GAME_LEVEL_SKIN1: number = 3;//当前关卡卡牌皮肤-水果
   static GAME_LEVEL1: any[] = [
      { x: -100, y: 150 }, { x: 0, y: 150 }, { x: 100, y: 150 },
      { x: -100, y: 140 }, { x: 0, y: 140 }, { x: 100, y: 140 },
      { x: -100, y: 0 }, { x: 0, y: 0 }, { x: 100, y: 0 },
      { x: -100, y: -10 }, { x: 0, y: -10 }, { x: 100, y: -10 },
      { x: -100, y: -20 }, { x: 0, y: -20 }, { x: 100, y: -20 },
      { x: -100, y: -150 }, { x: 0, y: -150 }, { x: 100, y: -150 },
      { x: -100, y: -160 }, { x: 0, y: -160 }, { x: 100, y: -160 }
   ]

   static GAME_SUM_CARD2: number = 18
   static GAME_LEVEL_SKIN2: number = 3;//当前关卡卡牌皮肤--羊了个羊（仅供学习使用）
   static GAME_LEVEL2: any[] = [

      { x: -270, y: 282 }, { x: -180, y: 282 }, { x: -90, y: 282 }, { x: 0, y: 282 }, { x: 90, y: 282 }, { x: 180, y: 282 }, { x: 270, y: 282 },
      { x: -270, y: 188 }, { x: -180, y: 188 }, { x: -90, y: 188 }, { x: 0, y: 188 }, { x: 90, y: 188 }, { x: 180, y: 188 }, { x: 270, y: 188 },
      { x: -270, y: 94 }, { x: -180, y: 94 }, { x: -90, y: 94 }, { x: 0, y: 94 }, { x: 90, y: 94 }, { x: 180, y: 94 }, { x: 270, y: 94 },
      { x: -270, y: 0 }, { x: -180, y: 0 }, { x: -90, y: 0 }, { x: 0, y: 0 }, { x: 90, y: 0 }, { x: 180, y: 0 }, { x: 270, y: 0 },
      { x: -270, y: -94 }, { x: -180, y: -94 }, { x: -90, y: -94 }, { x: 0, y: -94 }, { x: 90, y: -94 }, { x: 180, y: -94 }, { x: 270, y: -94 },
      { x: -270, y: -188 }, { x: -180, y: -188 }, { x: -90, y: -188 }, { x: 0, y: -188 }, { x: 90, y: -188 }, { x: 180, y: -188 }, { x: 270, y: -188 },

      { x: -225, y: 235 }, { x: -135, y: 235 }, { x: -45, y: 235 }, { x: 45, y: 235 }, { x: 135, y: 235 }, { x: 225, y: 235 },
      { x: -225, y: 141 }, { x: -135, y: 141 }, { x: -45, y: 141 }, { x: 45, y: 141 }, { x: 135, y: 141 }, { x: 225, y: 141 },
      { x: -225, y: 47 }, { x: -135, y: 47 }, { x: -45, y: 47 }, { x: 45, y: 47 }, { x: 135, y: 47 }, { x: 225, y: 47 },
      { x: -225, y: -47 }, { x: -135, y: -47 }, { x: -45, y: -47 }, { x: 45, y: -47 }, { x: 135, y: -47 }, { x: 225, y: -47 },
      { x: -225, y: -141 }, { x: -135, y: -141 }, { x: -45, y: -141 }, { x: 45, y: -141 }, { x: 135, y: -141 }, { x: 225, y: -141 },

      { x: -180, y: 188 }, { x: -90, y: 188 }, { x: 0, y: 188 }, { x: 90, y: 188 }, { x: 180, y: 188 },
      { x: -180, y: 94 }, { x: -90, y: 94 }, { x: 0, y: 94 }, { x: 90, y: 94 }, { x: 180, y: 94 },
      { x: -180, y: 0 }, { x: -90, y: 0 }, { x: 0, y: 0 }, { x: 90, y: 0 }, { x: 180, y: 0 },
      { x: -180, y: -94 }, { x: -90, y: -94 }, { x: 0, y: -94 }, { x: 90, y: -94 }, { x: 180, y: -94 },


      { x: -225, y: 235 }, { x: -135, y: 235 }, { x: -45, y: 235 }, { x: 45, y: 235 }, { x: 135, y: 235 }, { x: 225, y: 235 },
      { x: -135, y: 141 }, { x: -45, y: 141 }, { x: 45, y: 141 }, { x: 135, y: 141 },
      { x: -135, y: 47 }, { x: 135, y: 47 },
      { x: -135, y: -47 }, { x: -45, y: -47 }, { x: 45, y: -47 }, { x: 135, y: -47 },
      { x: -225, y: -141 }, { x: -135, y: -141 }, { x: -45, y: -141 }, { x: 45, y: -141 }, { x: 135, y: -141 }, { x: 225, y: -141 },

      { x: -180, y: 188 }, { x: -90, y: 188 }, { x: 0, y: 188 }, { x: 90, y: 188 }, { x: 180, y: 188 },
      { x: -180, y: 94 }, { x: -90, y: 94 }, { x: 90, y: 94 }, { x: 180, y: 94 },
      { x: -180, y: 0 }, { x: -90, y: 0 }, { x: 90, y: 0 }, { x: 180, y: 0 },
      { x: -180, y: -94 }, { x: -90, y: -94 }, { x: 0, y: -94 }, { x: 90, y: -94 }, { x: 180, y: -94 },
   ]


}

